/*
 * @Author: Terry
 * @Date: 2022-10-21 19:39:13
 * @LastEditors: Terry
 * @LastEditTime: 2022-10-26 10:54:18
 * @Description: file content
 * @FilePath: \auxface_web\src\views\platform\api\auth.js
 */
// import axios from '@/utils/axios.js'
import axios from '@/utils/axios.js'
var pre = 'platform/admin/v1/auth/'
var func = ['pcLogin', 'loginQrCode', 'checkLogin', 'register', 'forget']
var api = {}
func.forEach(value => {
  api[value] = pre + value
})

var getQrCode = (params) => {
  return axios.get(api.loginQrCode, {params: params})
}

var checkLogin = (params) => {
  return axios.get(api.checkLogin, {params: params})
}

var pcLogin = (params) => {
  return axios.post(api.pcLogin, params)
}

var register = (params) => {
  return axios.post(api.register, params)
}

var forget = (params) => {
  return axios.post(api.forget, params)
}

export { getQrCode, checkLogin, pcLogin, register, forget }
